<template>
  <a-config-provider :get-popup-container="getPopupContainer" :locale="zhCN" prefix-cls="micro-ant">
    <router-view v-slot="{ Component, route }">
      <keep-alive :include="store.state.keepAliveList">
        <component :is="Component" :key="route.path" />
      </keep-alive>
    </router-view>
  </a-config-provider>
</template>

<script setup>
import { ConfigProvider, Message } from 'ant-design-vue';
import zhCN from 'ant-design-vue/es/locale/zh_CN';
import dayjs from 'dayjs';
import store from './store';
import 'dayjs/locale/zh-cn';
Message.config({
  top: '100px'
});
// const store = useStore();
dayjs.locale('en');
function getPopupContainer(el, dialogContext) {
  if (el) {
    return el.parentNode;
  }
  if (dialogContext) {
    return dialogContext.getDialogWrap();
  }
  if (!window.__MICRO_APP_ENVIRONMENT__) {
    return document.body;
  }
  return el ?? document.body;
}

ConfigProvider.config({
  getPopupContainer
});
</script>
<style lang="less">
@import url(./assets/styles/resetAntdesign.less);

// 自定义滚动条
:-webkit-autofill {
  transition: background-color 5000s ease-in-out 0s !important;
}
::-webkit-scrollbar {
  height: 10px;
  width: 10px;
}
::-webkit-scrollbar-thumb {
  border-radius: 10px;
  border: 2px solid #fff;
  background: #dee0e3;
}
::-webkit-scrollbar-thumb:hover {
  background-color: #c1c1c1;
}
.tj-popup__content {
  background-color: #333333 !important;
  padding: 1px 8px !important;
  height: 27px !important;
  color: #fff !important;
  font-size: 11px !important;
  margin-top: 1px !important;
  top: -4px !important;
}
.tj-popup__arrow:before {
  background: #333333 !important;
  box-shadow: none !important;
}
.micro-ant-message-custom-content {
  display: flex !important;
  align-items: center !important;
}
.anticon {
  top: 0px !important;
}
h1 {
  span {
    font-size: 42px !important;
    font-weight: unset !important;
  }
}
h2 {
  span {
    font-size: 34px !important;
    font-weight: unset !important;
  }
}
h3 {
  span {
    font-size: 28.72px !important;
    font-weight: unset !important;
  }
}
h4 {
  span {
    font-size: 26px !important;
    font-weight: unset !important;
  }
}
h5 {
  span {
    font-size: 23.28px !important;
    font-weight: unset !important;
  }
}
</style>
